package com.imooc.converter;

import com.imooc.dto.address.AddAddressRequest;
import com.imooc.dto.address.AddressDto;
import com.imooc.dto.category.CategoryDto;
import com.imooc.pojo.Category;
import com.imooc.pojo.UserAddress;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @ClassName: AddressConverter
 * @Description:  用户地址 转换器
 * @author: limingxing
 * @Date: 2019-12-26 13:31
 */
@Mapper(componentModel = "spring")
public interface AddressConverter {

    @Mappings({})
    AddressDto address2Dto(UserAddress address);

    List<AddressDto> address2List(List<UserAddress> addresses);

    @Mappings({})
    UserAddress req2Address(AddAddressRequest request);

}
